package liuyang.bigeventserver.modules.security.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;

import java.io.Serializable;
import java.util.Collection;

/**
 * 登录后需要缓存入Redis的信息
 * key:username
 * value:CachedInfo
 *
 * 20240303 探索期间先不和Spring Security解耦，后续再考虑。
 *
 * @author xconf
 * @since 2024/3/3
 */
@Data
@AllArgsConstructor
@NoArgsConstructor// 必须有！
public class CachedInfo implements Serializable {
    private String jwt;
    private Collection<? extends GrantedAuthority> authorities;
}
